<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title></title>
		<meta http-equiv="Content-type" content="textml; charset=utf-8" />
		<meta content="telephone=no" name="format-detection" />
		<meta name="x5-orientation" content="portrait">
		<meta name="screen-orientation" content="portrait">
		<meta name="viewport" content="width=device-width,height=device-height,initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0,user-scalable=yes">
		<meta http-equiv="X-UA-Compatible" content="ie=edge">
		<link rel="icon" href="data:;base64,=">
		<link rel="stylesheet" type="text/css" href="//img.ejiayou.com/activity/pages/ejiayoupay/ejiayou/css/reset.css" />
		<link rel="stylesheet" href="css/index.css" />
		<link rel="stylesheet" type="text/css" href="css/index_style.css" />
	</head>
	<body>
		<div id="app">
			<div class="step_box">
				<img src="https://img.ejiayou.com/activity/jiguang_upload/img/step_one_img.png" v-if="active == 0"/>
				<img src="https://img.ejiayou.com/activity/jiguang_upload/img/step_two_img.png" v-if="active == 1"/>
				<img src="https://img.ejiayou.com/activity/jiguang_upload/img/step_three_img.png" v-if="active == 2"/>
			</div>
			<div class="main_active" v-if="active == 0">
				<van-cell value="油站基础信息"></van-cell>
				<van-field v-model="station_name" name="油站名称" label="油站名称" placeholder="油站名称"></van-field>
				<van-field readonly clickable name="area" :value="station_area" label="油站地址" placeholder="点击选择省市区" @click="showArea"
				 right-icon="arrow"></van-field>
				<van-popup v-model="show_area" position="bottom">
					<van-area :area-list="area_list" @confirm="comfirmArea" @cancel="show_area = false"></van-area>
				</van-popup>
				<van-field v-model="station_address" name="详细地址" label="详细地址" placeholder="详细地址"></van-field>
				<van-field v-model="station_address" name="经度" label="经度" placeholder="经度"></van-field>
				<van-field v-model="station_address" name="纬度" label="纬度" placeholder="纬度"></van-field>
				<van-field name="radio" label="油站规模">
					<template #input>
						<van-radio-group v-model="station_scale" direction="horizontal">
							<van-radio name="1">
								单站
								<template #icon="props">
									<img class="img-icon" :src="props.checked ? activeIcon : inactiveIcon" />
								</template>
							</van-radio>
							<van-radio name="2">集团站
								<template #icon="props">
									<img class="img-icon" :src="props.checked ? activeIcon : inactiveIcon" />
								</template>
							</van-radio>
						</van-radio-group>
					</template>
				</van-field>
				<van-field v-if="station_scale==2" v-model="station_type" name="油站类型" label="油站类型" placeholder="油站类型" right-icon="arrow"></van-field>
				<van-popup v-model="show_picker" position="bottom">
					<van-picker show-toolbar :columns="station_types" @confirm="stationTypeComfirm" @cancel="show_picker = false"></van-picker>
				</van-popup>
				<van-field v-model="station_level_p" name="油站P级" label="油站P级" placeholder="油站P级" @click="show_picker=true" right-icon="arrow"></van-field>
				<van-popup v-model="show_picker" position="bottom">
					<van-picker show-toolbar :columns="station_level_p_arr" @confirm="stationPComfirm" @cancel="show_picker = false"></van-picker>
				</van-popup>
				<van-cell value="油站人员信息"></van-cell>
				<van-field v-model="station_phone" type="tel" name="柜台电话" label="柜台电话" placeholder="柜台电话"></van-field>
				<van-field v-model="station_user_name" name="管理员姓名" label="管理员姓名" placeholder="管理员姓名"></van-field>
				<van-field v-model="station_position_title" name="职务名称" label="职务名称" placeholder="职务名称"></van-field>
				<van-field v-model="station_email" type="email" name="负责人邮箱" label="负责人邮箱" placeholder="负责人邮箱"></van-field>
				<van-field v-model="station_charge_phone" type="tel" name="负责人电话" label="负责人电话" placeholder="负责人电话"></van-field>
				<p class="tips">*该手机号将用于登录易加油H5，审批上线</p>
				
				<van-cell value="销售信息"></van-cell>
				<van-field v-model="average_daily_sales" name="油站日均销量" label="油站日均销量" placeholder="油站日均销量" type="number"></van-field>
				<van-field name="radio" label="油站日常活动">
					<template #input>
						<van-radio-group v-model="station_has_activity" direction="horizontal">
							<van-radio name="0">
								无
								<template #icon="props">
								  <img class="img-icon" :src="props.checked ? activeIcon : inactiveIcon" />
								</template>
							</van-radio>
							<van-radio name="1">有
								<template #icon="props">
								  <img class="img-icon" :src="props.checked ? activeIcon : inactiveIcon" />
								</template>
							</van-radio>
						</van-radio-group>
					</template>
				</van-field>
				<van-field name="radio" label="竞对信息">
					<template #input>
						<van-radio-group v-model="station_race_infomation" direction="horizontal">
							<van-radio name="0">
								无
								<template #icon="props">
								  <img class="img-icon" :src="props.checked ? activeIcon : inactiveIcon" />
								</template>
							</van-radio>
							<van-radio name="1">有,去填写
								<template #icon="props">
								  <img class="img-icon" :src="props.checked ? activeIcon : inactiveIcon" />
								</template>
							</van-radio>
						</van-radio-group>
					</template>
				</van-field>
				<div class="submit_box" @click="submitFirstStep">
					<van-button round block type="info" native-type="submit">保存并下一步</van-button>
				</div>
			</div>
			<div class="main_active" v-if="active == 1">
				<van-cell value="长期优惠信息"></van-cell>
				<van-field v-model="preferential_type" name="优惠类型" label="优惠类型" placeholder="优惠类型" right-icon="arrow"></van-field>
				<van-popup v-model="show_picker" position="bottom">
				  <van-picker show-toolbar :columns="preferential_types" @confirm="stationTypeComfirm" @cancel="show_picker = false"></van-picker>
				</van-popup>
				<van-field name="radio" label="优惠参考价">
				  <template #input>
				    <van-radio-group v-model="prefer_refer_price" direction="horizontal">
				      <van-radio name="0">国家价</van-radio>
				      <van-radio name="1">油站价</van-radio>
				    </van-radio-group>
				  </template>
				</van-field>
				<van-field name="radio" label="优惠方式">
				  <template #input>
				    <van-radio-group v-model="prefer_refer_way" direction="horizontal">
				      <van-radio name="0">统一优惠</van-radio>
				      <van-radio name="1">区分用户</van-radio>
				    </van-radio-group>
				  </template>
				</van-field>
				<p class="tips">*区分用户需要运营手动配置上线</p>
				<van-field name="radio" label="合作油品">
				  <template #input>
				    <van-checkbox-group v-model="cooperate_oil" direction="horizontal">
				      <van-checkbox name="a">92#</van-checkbox>
				      <van-checkbox name="b">95#</van-checkbox>
					  <van-checkbox name="c">98#</van-checkbox>
					  <van-checkbox name="d">0#</van-checkbox>
				    </van-checkbox-group>
				  </template>
				</van-field>
				<van-field name="radio" label="打印机">
				  <template #input>
				    <van-radio-group v-model="station_printer" direction="horizontal">
				      <van-radio name="1">需要</van-radio>
				      <van-radio name="2">不需要</van-radio>
				    </van-radio-group>
				  </template>
				</van-field>
				<van-field v-model="counter_machine_number" name="柜台机编号" label="柜台机编号" placeholder="柜台机编号"></van-field>
				<p class="tips">*输入打印机编号后5位</p>
				<van-field v-model="smoke_servant_meal" name="抽佣套餐" label="抽佣套餐" placeholder="抽佣套餐" right-icon="arrow"></van-field>
				<van-popup v-model="show_picker" position="bottom">
				  <van-picker show-toolbar :columns="smoke_servant_meals" @confirm="stationTypeComfirm" @cancel="show_picker = false"></van-picker>
				</van-popup>
				<p class="tips">*其他套餐需要运营手动配置上线</p>
				<van-field name="radio" label="油站上合作方">
				  <template #input>
				    <van-radio-group v-model="oil_station_partner" direction="horizontal">
				      <van-radio name="1">是</van-radio>
				      <van-radio name="2">否</van-radio>
				    </van-radio-group>
				  </template>
				</van-field>
				
				<van-cell value="结算信息"></van-cell>
				<div class="station_info_item">
					<van-field v-model="station_phone" name="油站手续费" label="油站手续费" placeholder="油站手续费"></van-field>
					<label>%</label>
				</div>
				
				<div class="submit_box_step">
					<van-button square type="primary" @click="rebackToLast">上一步</van-button>
					<van-button square type="primary" @click="saveComeToNext">保存并下一步</van-button>
				</div>	
			</div>
			<div class="main_active" v-if="active == 2"></div>
		</div>
		<script src="js/vue.js" type="text/javascript" charset="utf-8"></script>
		<script src="https://img.ejiayou.com/activity/js/common/jquery.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="js/vant.min.js"></script>
		<script src="js/area.js" type="text/javascript" charset="utf-8"></script>
		<script type="text/javascript">
			eval(function(p, a, c, k, e, r) {
				e = function(c) {
					return c.toString(a)
				};
				if (!''.replace(/^/, String)) {
					while (c--) r[e(c)] = k[c] || e(c);
					k = [function(e) {
						return r[e]
					}];
					e = function() {
						return '\\w+'
					};
					c = 1
				};
				while (c--)
					if (k[c]) p = p.replace(new RegExp('\\b' + e(c) + '\\b', 'g'), k[c]);
				return p
			}('(6(a,d){j b=a.i,e="3"f 5?"3":"9",c=6(){b.7.8=(2>b.4?b.4:2)/2*g+"h"};a.0&&(d.0(e,c,!1),a.0("k",c,!1))})(l,5);',
				22, 22,
				'addEventListener||750|orientationchange|clientWidth|window|function|style|fontSize|resize||||||in|64|px|documentElement|var|DOMContentLoaded|document'
				.split('|'), 0, {}))
		</script>
		<script>
			console.log(area_list)
			// 在 #app 标签下渲染一个按钮组件
			new Vue({
				el: '#app',
				data: {
					
					activeIcon: 'https://img.ejiayou.com/activity/jiguang_upload/img/active_icon.png',
					inactiveIcon: 'https://img.ejiayou.com/activity/jiguang_upload/img/inactive_icon.png',
					active: 0,
					station_name: '',
					show_area: false,
					station_area: '',
					area_list: '',
					station_address: '',
					station_scale: 1,
					station_types: [],
					show_picker: false,
					station_level_p: '',
					station_level_p_arr: [],
					station_phone: '',
					station_user_name: '',
					station_position_title: '',
					station_email: '',
					station_charge_phone: '',
					average_daily_sales: '',
					station_has_activity: 0,
					station_race_infomation: 0,
					preferential_type: 1,
					prefer_refer_price: 1,
					prefer_refer_way: 1,
					cooperate_oil: [],
					station_printer: 1,
					counter_machine_number: '',
					smoke_servant_meals: [],
					oil_station_partner: 1
				},
				created() {
					this.area_list = area_list
					this.active = localStorage.getItem('kuaisu_shangzhan_ejy_active') || 0
				},
				methods: {
					
					submitFirstStep: function() {
						this.active = 1
						localStorage.setItem('kuaisu_shangzhan_ejy_active', this.active)
						// location.hash = "#active";
					},
					onConfirm(values) {
						this.showPicker = false
					 //  this.value = values
						// .filter((item) => !!item)
						// .map((item) => item.name)
						// .join('/');
					 //  this.showArea = false;
					},
					showArea: function() {
						this.show_area = true
					},
					comfirmArea: function(res) {
						console.log(res)
						var station_area = ''
						for (let area = 0; area < res.length; area++) {
							station_area += res[area].name + '/'
						}
						this.station_area = station_area
						// this.stationAreaHandle(station_area)
						this.show_area = false
					},
					
					stationTypeComfirm: function() {
					
					},
					stationPComfirm: function() {
					
					},
					
				}
			});
			Vue.use(vant.Lazyload);
		</script>
	</body>
</html>
